/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "song_songs")
//@NamedQueries({@NamedQuery(name = "SongSongs.findAll", query = "SELECT s FROM SongSongs s"), @NamedQuery(name = "SongSongs.findBySongId", query = "SELECT s FROM SongSongs s WHERE s.songId = :songId"), @NamedQuery(name = "SongSongs.findByName", query = "SELECT s FROM SongSongs s WHERE s.name = :name"), @NamedQuery(name = "SongSongs.findByIsrc", query = "SELECT s FROM SongSongs s WHERE s.isrc = :isrc"), @NamedQuery(name = "SongSongs.findByDateReceived", query = "SELECT s FROM SongSongs s WHERE s.dateReceived = :dateReceived"), @NamedQuery(name = "SongSongs.findByDateReleased", query = "SELECT s FROM SongSongs s WHERE s.dateReleased = :dateReleased"), @NamedQuery(name = "SongSongs.findByParentalAdvisory", query = "SELECT s FROM SongSongs s WHERE s.parentalAdvisory = :parentalAdvisory"), @NamedQuery(name = "SongSongs.findByDuration", query = "SELECT s FROM SongSongs s WHERE s.duration = :duration"), @NamedQuery(name = "SongSongs.findByCopyright", query = "SELECT s FROM SongSongs s WHERE s.copyright = :copyright"), @NamedQuery(name = "SongSongs.findBySellable", query = "SELECT s FROM SongSongs s WHERE s.sellable = :sellable"), @NamedQuery(name = "SongSongs.findByDateSellable", query = "SELECT s FROM SongSongs s WHERE s.dateSellable = :dateSellable"), @NamedQuery(name = "SongSongs.findByContentUse", query = "SELECT s FROM SongSongs s WHERE s.contentUse = :contentUse"), @NamedQuery(name = "SongSongs.findByComposer", query = "SELECT s FROM SongSongs s WHERE s.composer = :composer"), @NamedQuery(name = "SongSongs.findByTakedown", query = "SELECT s FROM SongSongs s WHERE s.takedown = :takedown"), @NamedQuery(name = "SongSongs.findByAvailable", query = "SELECT s FROM SongSongs s WHERE s.available = :available"), @NamedQuery(name = "SongSongs.findByAudioType", query = "SELECT s FROM SongSongs s WHERE s.audioType = :audioType"), @NamedQuery(name = "SongSongs.findByCacheState", query = "SELECT s FROM SongSongs s WHERE s.cacheState = :cacheState"), @NamedQuery(name = "SongSongs.findByRingtoneId", query = "SELECT s FROM SongSongs s WHERE s.ringtoneId = :ringtoneId"), @NamedQuery(name = "SongSongs.findByRBTId", query = "SELECT s FROM SongSongs s WHERE s.rBTId = :rBTId")})
public class SongSongs implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "songId")
    private Integer songId;
    @Basic(optional = false)
    @Column(name = "name")
    private String name;
    @Column(name = "isrc")
    private String isrc;
    @Basic(optional = false)
    @Column(name = "dateReceived")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateReceived;
    @Column(name = "dateReleased")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateReleased;
    @Column(name = "parentalAdvisory")
    private Character parentalAdvisory;
    @Column(name = "duration")
    private Integer duration;
    @Column(name = "copyright")
    private String copyright;
    @Column(name = "sellable")
    private Character sellable;
    @Column(name = "dateSellable")
    @Temporal(TemporalType.DATE)
    private Date dateSellable;
    @Basic(optional = false)
    @Column(name = "contentUse")
    private String contentUse;
    @Column(name = "composer")
    private String composer;
    @Basic(optional = false)
    @Column(name = "takedown")
    private char takedown;
    @Basic(optional = false)
    @Column(name = "available")
    private char available;
    @Basic(optional = false)
    @Column(name = "audio_type")
    private String audioType;
    @Basic(optional = false)
    @Column(name = "cache_state")
    private char cacheState;
    @Column(name = "ringtoneId")
    private Integer ringtoneId;
    @Column(name = "RBTId")
    private Integer rBTId;
    @JoinTable(name = "song_songgenres", joinColumns = {@JoinColumn(name = "songId", referencedColumnName = "songId")}, inverseJoinColumns = {@JoinColumn(name = "genre_id", referencedColumnName = "genre_id")})
    @ManyToMany
    private Set<TGenre> tGenreSet;
    @Transient 
    private Integer price;
    @Transient 
    private String pricetype;
    @Transient 
    private String servicecode;
    @Transient 
    private String servicename;
    public String getServicename() {
		return servicename;
	}

	public void setServicename(String servicename) {
		this.servicename = servicename;
	}

	public Integer getPrice() {
		return price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}

	public String getPricetype() {
		return pricetype;
	}

	public void setPricetype(String pricetype) {
		this.pricetype = pricetype;
	}

	public String getServicecode() {
		return servicecode;
	}

	public void setServicecode(String servicecode) {
		this.servicecode = servicecode;
	}

	public SongSongs() {
    }

    public SongSongs(Integer songId) {
        this.songId = songId;
    }

    public SongSongs(Integer songId, String name, Date dateReceived, String contentUse, char takedown, char available, String audioType, char cacheState) {
        this.songId = songId;
        this.name = name;
        this.dateReceived = dateReceived;
        this.contentUse = contentUse;
        this.takedown = takedown;
        this.available = available;
        this.audioType = audioType;
        this.cacheState = cacheState;
    }

    public Integer getSongId() {
        return songId;
    }

    public void setSongId(Integer songId) {
        this.songId = songId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIsrc() {
        return isrc;
    }

    public void setIsrc(String isrc) {
        this.isrc = isrc;
    }

    public Date getDateReceived() {
        return dateReceived;
    }

    public void setDateReceived(Date dateReceived) {
        this.dateReceived = dateReceived;
    }

    public Date getDateReleased() {
        return dateReleased;
    }

    public void setDateReleased(Date dateReleased) {
        this.dateReleased = dateReleased;
    }

    public Character getParentalAdvisory() {
        return parentalAdvisory;
    }

    public void setParentalAdvisory(Character parentalAdvisory) {
        this.parentalAdvisory = parentalAdvisory;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getCopyright() {
        return copyright;
    }

    public void setCopyright(String copyright) {
        this.copyright = copyright;
    }

    public Character getSellable() {
        return sellable;
    }

    public void setSellable(Character sellable) {
        this.sellable = sellable;
    }

    public Date getDateSellable() {
        return dateSellable;
    }

    public void setDateSellable(Date dateSellable) {
        this.dateSellable = dateSellable;
    }

    public String getContentUse() {
        return contentUse;
    }

    public void setContentUse(String contentUse) {
        this.contentUse = contentUse;
    }

    public String getComposer() {
        return composer;
    }

    public void setComposer(String composer) {
        this.composer = composer;
    }

    public char getTakedown() {
        return takedown;
    }

    public void setTakedown(char takedown) {
        this.takedown = takedown;
    }

    public char getAvailable() {
        return available;
    }

    public void setAvailable(char available) {
        this.available = available;
    }

    public String getAudioType() {
        return audioType;
    }

    public void setAudioType(String audioType) {
        this.audioType = audioType;
    }

    public char getCacheState() {
        return cacheState;
    }

    public void setCacheState(char cacheState) {
        this.cacheState = cacheState;
    }

    public Integer getRingtoneId() {
        return ringtoneId;
    }

    public void setRingtoneId(Integer ringtoneId) {
        this.ringtoneId = ringtoneId;
    }

    public Integer getRBTId() {
        return rBTId;
    }

    public void setRBTId(Integer rBTId) {
        this.rBTId = rBTId;
    }

    public Set<TGenre> getTGenreSet() {
        return tGenreSet;
    }

    public void setTGenreSet(Set<TGenre> tGenreSet) {
        this.tGenreSet = tGenreSet;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (songId != null ? songId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongSongs)) {
            return false;
        }
        SongSongs other = (SongSongs) object;
        if ((this.songId == null && other.songId != null) || (this.songId != null && !this.songId.equals(other.songId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongSongs[songId=" + songId + "]";
    }

}
